﻿using Microsoft.Extensions.Logging;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CrystalQuartz.Demo.Jobs
{
    public interface IQuartzJob : IJob
    {
        
    }

    public abstract class AbstractQuartzJob : IQuartzJob
    {
        public ILogger<AbstractQuartzJob> Logger { get; set; }
        public AbstractQuartzJob()
        {

        }

        Task IJob.Execute(IJobExecutionContext context)
        {
            return Execute(context);
        }

        protected async virtual Task Execute(IJobExecutionContext context)
        {
            await Task.CompletedTask;
        }

    }
}
